/*
 * @Author: qianmingtian
 * @Date: 2020-07-09 16:21:24
 * @LastEditors: qianmingtian
 * @LastEditTime: 2020-07-09 17:30:56
 * @FilePath: \qianmingtian.github.io\code\java\SortAlogrithm\Test.java
 */
package SortAlogrithm;

/**
 * 套娃 ，编译不会有任何问题，执行肯定会栈溢出
 */

class A {
    public void methodA(B b) {
        b.methodB(this);
        System.out.println(" a 调用的 b 方法");
    }
}

class B {
    public void methodB(A a) {
        a.methodA(this);
        System.out.println(" b 调用的 a 方法");
    }
}


public class Test {
    public static void main(String[] args) {
        A a = new A();
        B b = new B();
        a.methodA(b);
    }
}/*
  * @Author: qianmingtian
  * 
  * @Date: 2020-07-09 16:21:24
  * 
  * @LastEditors: qianmingtian
  * 
  * @LastEditTime: 2020-07-09 16:21:24
  * 
  * @FilePath: \qianmingtian.github.io\code\java\SortAlogrithm\Test.java
  */
